\hypertarget{class_ufo}{
\section{Ufo Class Reference}
\label{class_ufo}\index{Ufo@{Ufo}}
}


Game object for ufo enemy.  


Inheritance diagram for Ufo:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_ufo}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810}{UfoMovement} \{ \hyperlink{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810af61a1ac7cd8ded521e1e6a08396fbd90}{SineMovement}, 
\hyperlink{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810a37b94d1001252586a5a8e3ab19dfc5c5}{CircularMovement}
 \}
\begin{DoxyCompactList}\small\item\em Type of \hyperlink{class_ufo}{Ufo} movement on screen. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ufo_a132291a80546508f7151c432d97cb9bf}{Ufo} (int, bool, \hyperlink{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810}{UfoMovement}, FPtype)
\begin{DoxyCompactList}\small\item\em Constructor for \hyperlink{class_ufo}{Ufo}. \item\end{DoxyCompactList}\item 
void \hyperlink{class_ufo_a57d72ea558f08463569ee445b1e14d9a}{doUfoSteering} (FPtype)
\begin{DoxyCompactList}\small\item\em Calculate steering and a new velocity for UFO based on selected movement mode. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_ufo_acec1a8d52e2af23ea4c385923e7931a4}{
\hyperlink{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810}{UfoMovement} \hyperlink{class_ufo_acec1a8d52e2af23ea4c385923e7931a4}{movement}}
\label{class_ufo_acec1a8d52e2af23ea4c385923e7931a4}

\begin{DoxyCompactList}\small\item\em Movement type. \item\end{DoxyCompactList}\item 
\hypertarget{class_ufo_aacddfb09ac235865a6a2dda91509794a}{
FPtype \hyperlink{class_ufo_aacddfb09ac235865a6a2dda91509794a}{direction}}
\label{class_ufo_aacddfb09ac235865a6a2dda91509794a}

\begin{DoxyCompactList}\small\item\em Direction movement. \item\end{DoxyCompactList}\item 
\hypertarget{class_ufo_aba0a288fa4ef8eb5d2ec5898608a7558}{
FPtype \hyperlink{class_ufo_aba0a288fa4ef8eb5d2ec5898608a7558}{movementPhase}}
\label{class_ufo_aba0a288fa4ef8eb5d2ec5898608a7558}

\begin{DoxyCompactList}\small\item\em Phase of movement. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Game object for ufo enemy. \hyperlink{class_ufo}{Ufo} rotates on screen. 

\subsection{Member Enumeration Documentation}
\hypertarget{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810}{
\index{Ufo@{Ufo}!UfoMovement@{UfoMovement}}
\index{UfoMovement@{UfoMovement}!Ufo@{Ufo}}
\subsubsection[{UfoMovement}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Ufo::UfoMovement}}}
\label{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810}


Type of \hyperlink{class_ufo}{Ufo} movement on screen. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{SineMovement@{SineMovement}!Ufo@{Ufo}}\index{Ufo@{Ufo}!SineMovement@{SineMovement}}\item[{\em 
\hypertarget{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810af61a1ac7cd8ded521e1e6a08396fbd90}{
SineMovement}
\label{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810af61a1ac7cd8ded521e1e6a08396fbd90}
}]Sine wave movement. \index{CircularMovement@{CircularMovement}!Ufo@{Ufo}}\index{Ufo@{Ufo}!CircularMovement@{CircularMovement}}\item[{\em 
\hypertarget{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810a37b94d1001252586a5a8e3ab19dfc5c5}{
CircularMovement}
\label{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810a37b94d1001252586a5a8e3ab19dfc5c5}
}]Circular movement. \end{description}
\end{Desc}



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_ufo_a132291a80546508f7151c432d97cb9bf}{
\index{Ufo@{Ufo}!Ufo@{Ufo}}
\index{Ufo@{Ufo}!Ufo@{Ufo}}
\subsubsection[{Ufo}]{\setlength{\rightskip}{0pt plus 5cm}Ufo::Ufo (
\begin{DoxyParamCaption}
\item[{int}]{ frame, }
\item[{bool}]{ rewindEnabled, }
\item[{{\bf UfoMovement}}]{ movement, }
\item[{FPtype}]{ direction}
\end{DoxyParamCaption}
)}}
\label{class_ufo_a132291a80546508f7151c432d97cb9bf}


Constructor for \hyperlink{class_ufo}{Ufo}. 

{\itshape frame\/} Current frame number. When the \hyperlink{class_game_object}{GameObject} was created.

{\itshape rewindEnabled\/} Is the rewind mode enabled.

{\itshape movement\/} 

{\itshape direction\/} 

\subsection{Member Function Documentation}
\hypertarget{class_ufo_a57d72ea558f08463569ee445b1e14d9a}{
\index{Ufo@{Ufo}!doUfoSteering@{doUfoSteering}}
\index{doUfoSteering@{doUfoSteering}!Ufo@{Ufo}}
\subsubsection[{doUfoSteering}]{\setlength{\rightskip}{0pt plus 5cm}void Ufo::doUfoSteering (
\begin{DoxyParamCaption}
\item[{FPtype}]{ timestep}
\end{DoxyParamCaption}
)}}
\label{class_ufo_a57d72ea558f08463569ee445b1e14d9a}


Calculate steering and a new velocity for UFO based on selected movement mode. 

First a {\ttfamily \hyperlink{class_ufo_aba0a288fa4ef8eb5d2ec5898608a7558}{Ufo::movementPhase}} value is calculated. This is used for calculating the UFO phase when {\ttfamily SineMovement} or {\ttfamily CircularMovement} is selected.

To change UFO movement, add new value to \hyperlink{class_ufo_a8a1c56879a0c3d15ae316cd5d8233810}{Ufo::UfoMovement} and new logic here accordingly, e.g. 
\begin{DoxyCode}
 switch (movement) {
 case SineMovement:
      tmpX = 5.0f;
      tmpY = 15.0f * sin(movementPhase);
      break;
      ...
 }
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
\item[{\em timestep}]A timestep calculated for current game cycle (current game frame length) in milliseconds. \end{DoxyParams}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
ufo.h\item 
ufo.cpp\end{DoxyCompactItemize}
